package com.zy.algorithm.v3.sort;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;

import com.zy.activity.BaseFragment;
import com.zy.algorithm.sort.SortUtils;
import com.zy.algorithm.v3.R;
import com.zy.utils.data.Point;
import com.zy.view.sort.DIYSortView;

import java.util.Random;


public class RadixSortFragment extends BaseFragment {

    @Override
    protected int getLayout() {
        return R.layout.fragment_sort_merge;
    }

    @Override
    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);

        DIYSortView diy_v4 = view.findViewById(R.id.sort_view);
        int[] array = new int[]{999, 658, 444, 12, 4, 6, 2, 14, 63, 200};

        for (int i = 0; i < array.length; i++) {
            array[i] = new Random().nextInt(1000);
        }

        diy_v4.setD(150);
        diy_v4.create(3, 2, array, Point.Type.DEFAULT);
        diy_v4.addAss(3, 1, "V");


        int[] assistArray = new int[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9,};
        diy_v4.addAssistList(3, 6, assistArray, Point.Type.ASSIST);

    }
}
